<?
/**
 * Webapp Main Menu
 */
(basename($_SERVER['PHP_SELF']) == basename(__FILE__)) && die('Access Denied');

// Set title
$this->setTitle(WEB_APP_NAME . ' : Main Menu');
$this->addJs('js/menu.js');
?>
<?= $this->getPageHeader(); ?>
<style type="text/css">
th {
	text-align: center;
	}
tr:hover {
	background-color: #08FFE2;
	}
</style>
<div align="center">
<div id="page-container">
<div id="container-medium">
<?= getMenuBarMain(OPT_HOME); ?>
</div>

<div id="container-small">
<div class="content-view">

<table cellpadding="2" cellspacing="2">
<? $m = getMenubarLink(OPT_HOME); ?>
	<tr onClick='javascript:document.location.href="<?= $m->linkHref; ?>"'>
		<th>
			<?= $m->getImg(); ?>
		</th>
		<td>
			<?= OPT_HOME; ?>
		</td>
	</tr>
<? $m = getMenubarLink(OPT_EVENTS); ?>
	<tr onClick='javascript:document.location.href="<?= $m->linkHref; ?>"'>
		<th>
			<?= $m->getImg(); ?>
		</th>
		<td>
			<?= OPT_EVENTS; ?>
		</td>
	</tr>
<? if (hasAccess('Admin')) { ?>
<? $m = getMenubarLink(OPT_ADMIN); ?>
	<tr onClick='javascript:document.location.href="<?= $m->linkHref; ?>"'>
		<th>
			<?= $m->getImg(); ?>
		</th>
		<td>
			<?= OPT_ADMIN; ?>
		</td>
	</tr>
<? } ?>
	<tr>
		<th>
			<?= getMenubarLink(OPT_PASSCHANGE)->get(); ?>
		</th>
		<td>
			<?= OPT_PASSCHANGE; ?>
		</td>
	</tr>
	<tr>
		<th>
			<?= getMenubarLink(OPT_LOGOUT)->get(); ?>
		</th>
		<td>
			<?= OPT_LOGOUT; ?>
		</td>
	</tr>
</table>

</div> <!-- content-view -->
</div> <!-- container-medium -->
</div> <!-- page-container -->
</div> <!-- center -->
<?= $this->getPageFooter(); ?>
